package com.prs.crm.domain.ca.work;

import java.util.Set;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.prs.crm.domain.BaseEntity;

/**
 * @author YangHao
 * @E-Mail:450098606@qq.com
 * @qq:450098606
 * @version 创建时间：2012-3-28 15:04:16 库存查询
 */
@Entity
@Table(name = "ca_demandInventory")
public class DemandInventory extends BaseEntity {

	private static final long serialVersionUID = -6100615651692899846L;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	/**
	 * 物品类别
	 */
	@ManyToOne
	private ArticleTypes di_articletype;
	/**
	 * 品名
	 */
	private String di_articleName;
	/**
	 * 规格
	 */
	private String di_articleStandard;
	/**
	 * 数量
	 */
	private String di_articleNumber;
	/**
	 * 单位
	 */
	private String di_articleUnit;
	/**
	 * 单价
	 */
	private String di_articleUnivalence;
	/**
	 * 金额
	 */
	private String di_money;
	@ManyToOne
	private PurchaseApply purchaseApply;

	@OneToMany(fetch=FetchType.LAZY,mappedBy="demand")
	private Set<InventoryMaintain> inventoryMaintain;
	
	@OneToMany(fetch=FetchType.LAZY,mappedBy="demands")
	private Set<ArticleTook> articleTook;
	
	public Set<ArticleTook> getArticleTook() {
		return articleTook;
	}

	public void setArticleTook(Set<ArticleTook> articleTook) {
		this.articleTook = articleTook;
	}

	public Set<InventoryMaintain> getInventoryMaintain() {
		return inventoryMaintain;
	}

	public void setInventoryMaintain(Set<InventoryMaintain> inventoryMaintain) {
		this.inventoryMaintain = inventoryMaintain;
	}	
	public PurchaseApply getPurchaseApply() {
		return purchaseApply;
	}

	public void setPurchaseApply(PurchaseApply purchaseApply) {
		this.purchaseApply = purchaseApply;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public ArticleTypes getDi_articletype() {
		return di_articletype;
	}

	public void setDi_articletype(ArticleTypes diArticletype) {
		di_articletype = diArticletype;
	}

	public String getDi_articleName() {
		return di_articleName;
	}

	public void setDi_articleName(String diArticleName) {
		di_articleName = diArticleName;
	}

	public String getDi_articleStandard() {
		return di_articleStandard;
	}

	public void setDi_articleStandard(String diArticleStandard) {
		di_articleStandard = diArticleStandard;
	}

	public String getDi_articleNumber() {
		return di_articleNumber;
	}

	public void setDi_articleNumber(String diArticleNumber) {
		di_articleNumber = diArticleNumber;
	}

	public String getDi_articleUnit() {
		return di_articleUnit;
	}

	public void setDi_articleUnit(String diArticleUnit) {
		di_articleUnit = diArticleUnit;
	}

	public String getDi_articleUnivalence() {
		return di_articleUnivalence;
	}

	public void setDi_articleUnivalence(String diArticleUnivalence) {
		di_articleUnivalence = diArticleUnivalence;
	}

	public String getDi_money() {
		return di_money;
	}

	public void setDi_money(String diMoney) {
		di_money = diMoney;
	}
}
